import json
from common.log import logger


def process_response(response):
    try:
        assert response.status_code == 200 or response.status_code == 201 or response.status_code == 204 or response.status_code == 400 #这个登录接口就是400
    # if response.status_code == 200 or response.status_code == 201 or response.status_code == 204:
        logger.info("请求成功，状态码返回2开头！！！")
    except Exception as e:
        raise e
        # logger.error("接口状态码不是2开头，请检查")
    logger.info("接口的返回内容>>>：" + json.dumps(response.json(), ensure_ascii=False))
    return response.json()

